import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
// import './plugins/element.js'
import './assets/css/global.css'
import './assets/fonts/iconfont.css'
import './assets/font_jb725jpmds/iconfont.css'
import './assets/font_gc8cgtsfigi/iconfont.css'
import store from './store/index'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import './assets/font_gq73jjd3mdo/iconfont.js'

import axios from 'axios'
// import app from '../main-dev'
// NProgress动画
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
Vue.config.productionTip = false;
Vue.use(Element)
const app = new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
axios.interceptors.response.use(res => {
    NProgress.done()
    if (res.data.meta.status == 422 || res.data.meta.status == 402) {
        app.$message.error("登入过期");
        app.$router.push("/login");

    }
    return res;
})
export default app